﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XW
{
    /// <summary>
    /// 项目信息变更接口
    /// </summary>
    internal interface IProjInfoChange
    {
        /// <summary>
        /// 是否执行项目变更
        /// </summary>
        bool IsDoProjInfoChange();

        /// <summary>
        /// 获取项目变更详情
        /// </summary>
        /// <returns></returns>
        ProjChangeInfo GetProjChanges(ProjChangeFilter projChangeFilter);

        /// <summary>
        /// 项目变更保存后事件
        /// </summary>
        void SavedEvent(ProjChangeResult projChangeResult);

    }

    /// <summary>
    /// 变更
    /// </summary>
    public class ProjChangeInfo
    {
        /// <summary>
        /// 项目变更批次Id
        /// </summary>
        public string ProjChangeId { get; set; }

        /// <summary>
        /// 项目变更备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 变更列表
        /// </summary>
        public List<ProjChangeItem> ChangeList { get; set; }
    }

    /// <summary>
    /// 项目变更明细
    /// </summary>
    public class ProjChangeItem
    {
        /// <summary>
        /// 项目编码
        /// </summary>
        public string ProjCode { get; set; }

        /// <summary>
        /// 项目变更类型 ，加枚举
        /// </summary>
        public string ChangeType { get; set; }

        /// <summary>
        /// 项目变更内容
        /// </summary>
        public string ChangeInfo { get; set; }
    }

    /// <summary>
    /// 变更方法传入类
    /// </summary>
    public class ProjChangeFilter
    {
        /// <summary>
        /// 变更批次id
        /// </summary>
        public string ProjChangeId { get; set; }

        /// <summary>
        /// 项目编号
        /// </summary>
        public string ProjCode { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public string ChangeDateStart { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public string ChangeDateEnd { get; set; }

        /// <summary>
        /// 页大小
        /// </summary>
        public int PageSize { get; set; }

        /// <summary>
        /// 页码
        /// </summary>
        public int PageIndex { get; set; }
    }

    /// <summary>
    /// 变更结果
    /// </summary>
    public class ProjChangeResult
    {
        /// <summary>
        /// 变更批次id
        /// </summary>
        public string ProjChangeId { get; set; }

        /// <summary>
        /// 变更项目
        /// </summary>
        public string ProjCode { get; set; }
        /// <summary>
        /// 变更结果状态
        /// </summary>
        string ChangeStatus { get; set; }
        /// <summary>
        /// 变更结果描述
        /// </summary>
        string ChangeDesc { get; set; }
    }

}
